package ooday05;
/**static final常量演示*/

public class StaticFinalDemo {
    public static void main(String[] args) {
        System.out.println(Loo.PI);//常常通过类名访问
//        Loo.PI=3.1415926;
        System.out.println(Loo.num);
        //编译器在编译时会将常量直接替换为具体的数，效率高
        System.out.println(Loo.COUNT);

    }
}
class Loo{
    public static int num=4;
    public  static final int COUNT=5;

    public static final double PI=3.14159;
    public static final int A=4;
}
